package com.kk.blog.service;

//用户

import com.kk.blog.dao.UserRepository;
import com.kk.blog.pojo.User;
import com.kk.blog.util.MD5Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserRepository userRepository;

    @Override
    public User checkUser(String username, String password) {
        return userRepository.findByUsernameAndPassword(username, MD5Utils.code(password) );
    }
}
